package cn.tedu.oa_system.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author MW
 * @Description 系统菜单实体类
 * @CreateDate 2023/3/5
 */
@Data
@TableName(value = "sys_menu")
public class SysMenu implements Serializable {

    static final long serialVersionUID = 1L;

    @TableId
    private Long menuId;

    private Integer isShow;

    private Integer menuGrade;

    private String menuIcon;

    private String menuName;

    private String menuUrl;

    private Long parentId;

    private Integer sortId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysMenu sysMenu = (SysMenu) o;
        return Objects.equals(menuId, sysMenu.menuId) && Objects.equals(isShow, sysMenu.isShow) && Objects.equals(menuGrade, sysMenu.menuGrade) && Objects.equals(menuIcon, sysMenu.menuIcon) && Objects.equals(menuName, sysMenu.menuName) && Objects.equals(menuUrl, sysMenu.menuUrl) && Objects.equals(parentId, sysMenu.parentId) && Objects.equals(sortId, sysMenu.sortId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(menuId, isShow, menuGrade, menuIcon, menuName, menuUrl, parentId, sortId);
    }

    @Override
    public String toString() {
        return "SysMenu{" +
                "menuId=" + menuId +
                ", isShow=" + isShow +
                ", menuGrade=" + menuGrade +
                ", menuIcon='" + menuIcon + '\'' +
                ", menuName='" + menuName + '\'' +
                ", menuUrl='" + menuUrl + '\'' +
                ", parentId=" + parentId +
                ", sortId=" + sortId +
                '}';
    }
}
